package com.wenyang.controller;

import com.wenyang.service.CategoryService;
import com.wenyang.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Zx
 * @Date 2024/3/20 9:44
 * @Version 1.0
 */
@RestController
@RequestMapping("/category")
@Api(value = "类别管理",tags = {"类别管理"})
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    /**
     * 查询所有类别列表信息
     * @return
     */
    @GetMapping("findAll")
    @ApiOperation("类别列表")
    public R findAll(){
        return R.success(categoryService.findAll(),"请求成功");
    }



}
